import cookie from '@/store/cookie'
import baseUrl from '@/config/website.js'
import { Clear } from "@/common/Func.js"

// 获取最新版本号
// export const getLatestVersion = (data) => {
// 	return request({
// 		url: '/api/sczx/app/version/getLatestVersion',
// 		data: data,
// 	}, false, false)
// }

export const getLatestVersion = (data) => {
	return new Promise((resolve, reject) => {
		uni.request({
			url: 'https://admin.test.zxzyn.com/api/sczx/app/version/getLatestVersion',
			data: data,
			method: 'POST',
			success: (response) => {
				if (response.statusCode >= 200) {
					resolve(response)
				} else {
					reject(response)
				}
			},
			fail: (err) => {
				uni.showToast({
					title:err.errMsg,
					icon:'none'
				})
				reject(err)
			}
		})
	})
}